package main

import (
	"filestore-server/handler"
	"fmt"
	"net/http"
)

// 处理文件上传
func main() {
	http.HandleFunc("/file/upload", handler.UploadHandler)
	http.HandleFunc("/file/upload/success", handler.UploadSuccessHandler)
	http.HandleFunc("/file/meta", handler.GetFileMetaHandler)
	http.HandleFunc("/file/update", handler.DownloadHandler)
	http.HandleFunc("/file/delete", handler.DownloadHandler)
	err := http.ListenAndServe(":9090", nil)
	fmt.Println(22)
	if err != nil {
		fmt.Printf("Fail to start server,err %s", err.Error())
		return
	}

	fmt.Printf("server is running:%s\n", "9090")
}
